package com.aliyun.oss.pojo.DTO;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;

public class OrderSearchFormDTO implements Serializable {
    private String number;
    private String phone;

    // 接收起始日期，格式yyyy-MM-dd
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate startOrderTime;

    // 接收结束日期，格式yyyy-MM-dd
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate endOrderTime;

    private Integer status;
    private Integer pageNumber;

    public OrderSearchFormDTO(String number, String phone, LocalDate startOrderTime, LocalDate endOrderTime, Integer status, Integer pageNumber) {
        this.number = number;
        this.phone = phone;
        this.startOrderTime = startOrderTime;
        this.endOrderTime = endOrderTime;
        this.status = status;
        this.pageNumber = pageNumber;
    }

    @Override
    public String toString() {
        return "OrderSearchFormDTO{" +
                "number='" + number + '\'' +
                ", phone='" + phone + '\'' +
                ", startOrderTime=" + startOrderTime +
                ", endOrderTime=" + endOrderTime +
                ", status=" + status +
                ", pageNumber=" + pageNumber +
                '}';
    }

    public Integer getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(Integer pageNumber) {
        this.pageNumber = pageNumber;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public OrderSearchFormDTO(String number, String phone, LocalDate startOrderTime, LocalDate endOrderTime, Integer status) {
        this.number = number;
        this.phone = phone;
        this.startOrderTime = startOrderTime;
        this.endOrderTime = endOrderTime;
        this.status = status;
    }

    public OrderSearchFormDTO(String number, String phone, LocalDate startOrderTime, LocalDate endOrderTime) {
        this.number = number;
        this.phone = phone;
        this.startOrderTime = startOrderTime;
        this.endOrderTime = endOrderTime;
    }

    public OrderSearchFormDTO() {
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public LocalDate getStartOrderTime() {
        return startOrderTime;
    }

    public void setStartOrderTime(LocalDate startOrderTime) {
        this.startOrderTime = startOrderTime;
    }

    public LocalDate getEndOrderTime() {
        return endOrderTime;
    }

    public void setEndOrderTime(LocalDate endOrderTime) {
        this.endOrderTime = endOrderTime;
    }
}
